﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace project_soft.BLStub
{
  public  class Order1
    {
        private List<int> quantity;

        public List<int> Quantity
        {
            get { return quantity; }
            set { quantity = value; }
        }
        private List<Product1> product1;

        public List<Product1> Product1
        {
            get { return product1; }
            set { product1 = value; }
        }
        private Bill1 bill;

        public Bill1 Bill
        {
            get { return bill; }
            set { bill = value; }
        }

        
        public Order1() { }

        public Order1(List<Product1> product1, List<int> quantity, Bill1 bill)
        {
            // TODO: Complete member initialization
            this.product1 = product1;
            this.quantity = quantity;
            this.bill = bill;
        }
        public bool Insert_Product_Sell(Order1 order,int Sales_Id) {
            DBStubLayer.OrderDAC1 order1 = new DBStubLayer.OrderDAC1();
            if (order == null || order.Product1 == null || order.Quantity == null || order.Product1.Count == 0 || order.Quantity.Count == 0 || Sales_Id == 0) return false;
            else
            {

                return order1.Insert_Product_Sell(order,Sales_Id);
            }

            }
    }
}
